<%@ Page Culture="auto" UICulture="auto" Title="Bubble Tooltip Addition" Language="C#"
    MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="BubbleTooltipExamplePage.aspx.cs"
    Inherits="BM.Tools.WebControls.MForm.Example.Operations.BubbleTooltipExamplePage" %>

<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls.Titles"
    TagPrefix="mftitle" %>
<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls"
    TagPrefix="mf" %>
<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls.Additions"
    TagPrefix="mfadd" %>
<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls.ValueHandlers"
    TagPrefix="mfvh" %>
<asp:Content ContentPlaceHolderID="Demonstration" runat="server">
    <p>
        Place the mouse over the "i" sign on the right to the input and you will see field
        information.
    </p>
    <mf:RootValidator runat="server" ControlToValidate="Root1" />
    <mf:Root ID="Root1" runat="server" Name="Root1">
        <UriMappings>
            <mf:UriMapping Namespace="http://www.w3.org/2001/XMLSchema" Prefix="xs" />
            <mf:UriMapping Namespace="" Prefix="" />
        </UriMappings>
        <Contents>
            <mf:Branch runat="server" Name="Address">
                <Contents>
                    <mf:Leaf runat="server" Name="Street" Ordinal="1">
                        <Additions>
                            <mfadd:Restriction runat="server" RestrictionType="MaxLength" Value="100" />
                            <mfadd:BubbleTooltipAddition runat="server" />
                        </Additions>
                    </mf:Leaf>
                    <mf:Leaf runat="server" Name="HouseNumber" Ordinal="2">
                        <Additions>
                            <mfadd:Restriction runat="server" RestrictionType="MaxLength" Value="10" />
                            <mfadd:BubbleTooltipAddition runat="server" />
                        </Additions>
                    </mf:Leaf>
                    <mf:Leaf runat="server" MinOccurs="0" Name="FlatNumber" Ordinal="3">
                        <Additions>
                            <mfadd:Restriction runat="server" RestrictionType="MaxLength" Value="10" />
                            <mfadd:BubbleTooltipAddition runat="server" />
                        </Additions>
                    </mf:Leaf>
                    <mf:Leaf runat="server" Name="PostCode" Ordinal="4">
                        <Additions>
                            <mfadd:Restriction runat="server" RestrictionType="Pattern" Value="\d{2}-\d{3}" />
                            <mfadd:BubbleTooltipAddition runat="server" />
                        </Additions>
                    </mf:Leaf>
                    <mf:Leaf runat="server" Name="Post" Ordinal="5">
                        <Additions>
                            <mfadd:Restriction runat="server" RestrictionType="MaxLength" Value="50" />
                            <mfadd:BubbleTooltipAddition runat="server" />
                        </Additions>
                    </mf:Leaf>
                    <mf:Leaf runat="server" Name="City" Ordinal="6">
                        <Additions>
                            <mfadd:Restriction runat="server" RestrictionType="MaxLength" Value="50" />
                            <mfadd:BubbleTooltipAddition runat="server" />
                        </Additions>
                    </mf:Leaf>
                </Contents>
            </mf:Branch>
        </Contents>        
    </mf:Root>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Description" runat="server">
    <p>
        One of the interesting features of the <code>Addition</code> control, is that it
        may provide a description about its functionality. To provide a description of the
        <code>Addition</code> control functionality, the Addition needs to have the <code>appendDescription</code>
        method in javascript implemented. To display this description, another addition
        control needs to be added to the <code>Leaf</code> control. This addition is called
        the <code>BubbleTooltipAddition</code>.
    </p>
    <p>
        <code>BubbleTooltipAddition</code> renders a span element that displays a box with
        the data about an element when mouse is over and hides this box when the mouse is
        out.
    </p>
    <div class="Remark">
        <p>
            You can see that the Bubble tooltip addition is attached to every Leaf control on
            the page, which is not very convenient. To override this problem, read the description
            of the
            <asp:HyperLink runat="server" NavigateUrl="~/Operations/AdditionsAttacherPage.aspx"
                Text="Additions attacher" />.</p>
    </div>
</asp:Content>
